
package com.idea.rdftree.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import com.idea.rdftree.RdfTreeNode;
import com.idea.rdftree.RdfTreePanel;

public class RenameAction extends AbstractAction {

	private RdfTreePanel treePanel;

	public RenameAction(RdfTreePanel treePanel) {
		super("Rename");
		this.treePanel = treePanel;
	}

	public void actionPerformed(ActionEvent arg0) {
		((RdfTreeNode) treePanel.getClickedPath().getLastPathComponent())
			.renameRequest();
		treePanel.getTree().repaint();
	}

}
